-- @owner: zhanghuan96
-- @date: 2023/9/19
-- @testpoint: compile作为关键字测试
--step1:查询系统表;expect:compile为非保留关键字
select * from pg_get_keywords() where word ='compile';
--step2:作为数据库名;expect:成功
drop database if exists compile;
create database compile dbcompatibility 'B';
drop database if exists compile;
--step3:作为列名和表名;expect:成功
drop table if exists compile;
create table compile(compile timestamp);
drop table if exists compile;
drop table if exists compile;
create table compile("compile" timestamp);
drop table if exists compile;
drop table if exists compile;
create table compile("COMPILE" timestamp);
drop table if exists compile;
--step4:作为外部数据源名;expect:成功
drop data source if exists compile;
create data source compile;
drop data source if exists compile;
--step5:作为自定义函数名;expect:成功
drop function if exists compile(i integer);
create function compile(i integer)
returns integer
as $$
begin
    return i+1;
end;
$$ language plpgsql;
/
drop function if exists compile(i integer);
--step6:作为用户名;expect:成功
drop user if exists compile;
create user compile password 'Test_123';
drop user if exists compile;